package com.example.sls.service.impl.field;

import com.example.sls.pojo.field.PromoCodes;
import com.example.sls.dao.field.PromoCodesDao;
import com.example.sls.service.intserfaces.field.PromoCodesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 优惠代码表(PromoCodes)表服务实现类
 *
 * @author 蓝江富
 * @since 2024-06-18 10:55:07
 */
@Service
public class PromoCodesServiceImpl implements PromoCodesService {
  @Autowired
  PromoCodesDao promoCodesDao;

  @Override
  public PromoCodes queryById(Integer id) {
    return promoCodesDao.queryById(id);
  }

  @Override
  public int deleteById(Integer id) {
    return promoCodesDao.deleteById(id);
  }

  @Override
  public int update(PromoCodes promoCodes) {
    return promoCodesDao.update(promoCodes);
  }

  @Override
  public int insert(PromoCodes promoCodes) {
    return promoCodesDao.insert(promoCodes);
  }

  @Override
  public long count() {
    return promoCodesDao.count();
  }

  @Override
  public List<PromoCodes> queryAllByLimit(PromoCodes promoCodes, Integer pageSize, Integer offset) {
    return promoCodesDao.queryAllByLimit(promoCodes, pageSize, offset);
  }
}
